package org.domain.acount.util;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class ReportItem implements Serializable {


	/**
	 *
	 */
	private static final long serialVersionUID = 201002060938L;

	private String desc;

	private String fullPath;

	private boolean report;

	private List<ReportItem> sons = new ArrayList<ReportItem>();


	public ReportItem(String desc, String fullPath, boolean report) {
		super();
		this.desc = desc;
		this.fullPath = fullPath;
		this.report = report;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public List<ReportItem> getSons() {
		return sons;
	}

	public void setSons(List<ReportItem> sons) {
		this.sons = sons;
	}

	public String getFullPath() {
		return fullPath;
	}

	public void setFullPath(String fullPath) {
		this.fullPath = fullPath;
	}

	public boolean isReport() {
		return report;
	}

	public void setReport(boolean report) {
		this.report = report;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((fullPath == null) ? 0 : fullPath.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ReportItem other = (ReportItem) obj;
		if (fullPath == null) {
			if (other.fullPath != null)
				return false;
		} else if (!fullPath.equals(other.fullPath))
			return false;
		return true;
	}



}
